#    pythonequations is a collection of equations expressed as Python classes
#    Copyright (C) 2008 James R. Phillips
#    2548 Vera Cruz Drive
#    Birmingham, AL 35235 USA
#    email: zunzun@zunzun.com
#
#    License: BSD-style (see LICENSE.txt in main source directory)
#    Version info: $Id: Rational.py 274 2010-09-29 13:16:14Z zunzun.com $

import pythonequations, pythonequations.EquationBaseClasses, pythonequations.ExtraCodeForEquationBaseClasses
import numpy
numpy.seterr(all = 'raise') # numpy raises warnings, convert to exceptions to trap them


class RationalA3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational A"
    _HTML = "z = (a + bx + cy)/(1 + dx + fy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in) / (1.0 + d*x_in + f*y_in);\n"
        return s



class RationalB3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational B"
    _HTML = "z = (a + b*ln(x) + c*ln(y))/(1 + dx + fy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[3]+i] + coeff[2] * _id[_cwo[4]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*log(x_in) + c*log(y_in)) / (1.0 + d*x_in + f*y_in);\n"
        return s



class RationalC3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational C"
    _HTML = "z = (a + b*exp(x) + c*ln(y))/(1 + dx + fy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[3]+i] + coeff[2] * _id[_cwo[4]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*exp(x_in) + c*log(y_in)) / (1.0 + d*x_in + f*y_in);\n"
        return s



class RationalD3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational D"
    _HTML = "z = (a + b*ln(x) + c*exp(y))/(1 + dx + fy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[3]+i] + coeff[2] * _id[_cwo[4]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*log(x_in) + c*exp(y_in)) / (1.0 + d*x_in + f*y_in);\n"
        return s



class RationalE3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational E"
    _HTML = "z = (a + b*exp(x) + c*exp(y))/(1 + dx + fy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[3]+i] + coeff[2] * _id[_cwo[4]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*exp(x_in) + c*exp(y_in)) / (1.0 + d*x_in + f*y_in);\n"
        return s



class RationalF3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational F"
    _HTML = "z = (a + bx + cy)/(1 + d*ln(x) + f*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[3]+i] + coeff[4] * _id[_cwo[4]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in) / (1.0 + d*log(x_in) + f*log(y_in));\n"
        return s



class RationalG3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational G"
    _HTML = "z = (a + bx + cy)/(1 + d*exp(x) + f*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[3]+i] + coeff[4] * _id[_cwo[4]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in) / (1.0 + d*exp(x_in) + f*log(y_in));\n"
        return s



class RationalH3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational H"
    _HTML = "z = (a + bx + cy)/(1 + d*ln(x) + f*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[3]+i] + coeff[4] * _id[_cwo[4]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in) / (1.0 + d*log(x_in) + f*exp(y_in));\n"
        return s



class RationalI3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational I"
    _HTML = "z = (a + bx + cy)/(1 + d*exp(x) + f*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[3]+i] + coeff[4] * _id[_cwo[4]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in) / (1.0 + d*exp(x_in) + f*exp(y_in));\n"
        return s



class RationalJ3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational J"
    _HTML = "z = (a + b*ln(x) + c*ln(y))/(1 + d*ln(x) + f*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*log(x_in) + c*log(y_in)) / (1.0 + d*log(x_in) + f*log(y_in));\n"
        return s



class RationalK3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational K"
    _HTML = "z = (a + b*exp(x) + c*ln(y))/(1 + d*exp(x) + f*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*exp(x_in) + c*log(y_in)) / (1.0 + d*exp(x_in) + f*log(y_in));\n"
        return s



class RationalL3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational L"
    _HTML = "z = (a + b*ln(x) + c*exp(y))/(1 + d*ln(x) + f*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*log(x_in) + c*exp(y_in)) / (1.0 + d*log(x_in) + f*exp(y_in));\n"
        return s



class RationalM3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational M"
    _HTML = "z = (a + b*exp(x) + c*exp(y))/(1 + d*exp(x) + f*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", 'f')
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i]) / (1.0 + coeff[3] * _id[_cwo[1]+i] + coeff[4] * _id[_cwo[2]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*exp(x_in) + c*exp(y_in)) / (1.0 + d*exp(x_in) + f*exp(y_in));\n"
        return s



class RationalN3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational N"
    _HTML = "z = (a + bx + cy + dxy)/(1 + fx + gy + hxy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in + d*x_in*y_in) / (1.0 + f*x_in + g*y_in + h*x_in*y_in);\n"
        return s



class RationalO3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational O"
    _HTML = "z = (a + b*(x) + c*ln(y) + d*ln(x)ln(y))/(1 + fx + gy + hxy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[4]+i] + coeff[2] * _id[_cwo[5]+i] + coeff[3] * _id[_cwo[6]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*log(x_in) + c*log(y_in) + d*log(x_in)*log(y_in)) / (1.0 + f*x_in + g*y_in + h*x_in*y_in);\n"
        return s



class RationalP3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational P"
    _HTML = "z = (a + b*exp(x) + c*ln(y) + d*exp(x)ln(y))/(1 + fx + gy + hxy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[4]+i] + coeff[2] * _id[_cwo[5]+i] + coeff[3] * _id[_cwo[6]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*exp(x_in) + c*log(y_in) + d*expx_in)*log(y_in)) / (1.0 + f*x_in + g*y_in + h*x_in*y_in);\n"
        return s



class RationalQ3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational Q"
    _HTML = "z = (a + b*ln(x) + c*exp(y) + d*ln(x)exp(y))/(1 + fx + gy + hxy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[4]+i] + coeff[2] * _id[_cwo[5]+i] + coeff[3] * _id[_cwo[6]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*log(x_in) + c*exp(y_in) + d*log(x_in)*exp(y_in)) / (1.0 + f*x_in + g*y_in + h*x_in*y_in);\n"
        return s



class RationalR3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational R"
    _HTML = "z = (a + b*exp(x) + c*exp(y) + d*v(x)exp(y))/(1 + fx + gy + hxy)"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[4]+i] + coeff[2] * _id[_cwo[5]+i] + coeff[3] * _id[_cwo[6]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp = (a + b*exp(x_in) + c*exp(y_in) + d*exp(x_in)*exp(y_in)) / (1.0 + f*x_in + g*y_in + h*x_in*y_in);\n"
        return s



class RationalS3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational S"
    _HTML = "z = (a + bx + cy + dxy)/(1 + f*ln(x) + g*ln(y) + h*ln(x)*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[4]+i] + coeff[5] * _id[_cwo[5]+i] + coeff[6] * _id[_cwo[6]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in + d*x_in*y_in) / (1.0 + f*log(x_in) + g*log(y_in) + h*log(x_in)*log(y_in));\n"
        return s



class RationalT3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational T"
    _HTML = "z = (a + bx + cy + dxy)/(1 + f*exp(x) + g*ln(y) + h*exp(x)*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[4]+i] + coeff[5] * _id[_cwo[5]+i] + coeff[6] * _id[_cwo[6]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in + d*x_in*y_in) / (1.0 + f*exp(x_in) + g*log(y_in) + h*exp(x_in)*log(y_in));\n"
        return s



class RationalU3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational U"
    _HTML = "z = (a + bx + cy + dxy)/(1 + f*ln(x) + g*exp(y) + h*ln(x)*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[4]+i] + coeff[5] * _id[_cwo[5]+i] + coeff[6] * _id[_cwo[6]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in + d*x_in*y_in) / (1.0 + f*log(x_in) + g*exp(y_in) + h*log(x_in)*exp(y_in));\n"
        return s



class RationalV3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational V"
    _HTML = "z = (a + bx + cy + dxy)/(1 + f*exp(x) + g*exp(y) + h*exp(x)*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[4]+i] + coeff[5] * _id[_cwo[5]+i] + coeff[6] * _id[_cwo[6]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_X(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Y(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_XY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*x_in + c*y_in + d*x_in*y_in) / (1.0 + f*exp(x_in) + g*exp(y_in) + h*exp(x_in)*exp(y_in));\n"
        return s




class RationalW3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational W"
    _HTML = "z = (a + b*ln(x) + c*ln(y) + d*ln(x)*ln(y))/(1 + f*ln(x) + g*ln(y) + h*ln(x)*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*log(x_in) + c*log(y_in) + d*log(x_in)*log(y_in)) / (1.0 + f*log(x_in) + g*log(y_in) + h*log(x_in)*log(y_in));\n"
        return s



class RationalX3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational X"
    _HTML = "z = (a + b*exp(x) + c*ln(y) + d*exp(x)*ln(y))/(1 + f*exp(x) + g*ln(y) + h*exp(x)*ln(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroY = True
    CannotAcceptDataWithNegativeY = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX_LogY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*exp(x_in) + c*log(y_in) + d*exp(x_in)*log(y_in)) / (1.0 + f*exp(x_in) + g*log(y_in) + h*exp(x_in)*log(y_in));\n"
        return s



class RationalY3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational Y"
    _HTML = "z = (a + b*ln(x) + c*exp(y) + d*ln(x)*exp(y))/(1 + f*ln(x) + g*exp(y) + h*ln(x)*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    CannotAcceptDataWithZeroX = True
    CannotAcceptDataWithNegativeX = True
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_LogX_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*log(x_in) + c*exp(y_in) + d*log(x_in)*exp(y_in)) / (1.0 + f*log(x_in) + g*exp(y_in) + h*log(x_in)*exp(y_in));\n"
        return s



class RationalZ3D(pythonequations.EquationBaseClasses.Equation3D):
    RequiresAutoGeneratedGrowthAndDecayForms = True
    RequiresAutoGeneratedOffsetForm = True
    RequiresAutoGeneratedReciprocalForm = False
    RequiresAutoGeneratedInverseForms = False
    _name ="Rational Z"
    _HTML = "z = (a + b*exp(x) + c*exp(y) + d*exp(x)*exp(y))/(1 + f*exp(x) + g*exp(y) + h*exp(x)*exp(y))"
    coefficientDesignatorTuple = ("a", "b", "c", "d", "f", "g", "h")
    function_cpp_code = 'temp = (coeff[0] + coeff[1] * _id[_cwo[1]+i] + coeff[2] * _id[_cwo[2]+i] + coeff[3] * _id[_cwo[3]+i]) / (1.0 + coeff[4] * _id[_cwo[1]+i] + coeff[5] * _id[_cwo[2]+i] + coeff[6] * _id[_cwo[3]+i]);'


    def CreateCacheGenerationList(self):
        self.CacheGenerationList = []
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_Ones(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpY(NameOrValueFlag=1), []])
        self.CacheGenerationList.append([pythonequations.ExtraCodeForEquationBaseClasses.CG_ExpX_ExpY(NameOrValueFlag=1), []])

    def SpecificCodeCPP(self):
        s = "\ttemp  = (a + b*exp(x_in) + c*exp(y_in) + d*exp(x_in)*exp(y_in)) / (1.0 + f*exp(x_in) + g*exp(y_in) + h*exp(x_in)*exp(y_in));\n"
        return s
